package com.example.hcbmsm.controller;

import com.example.hcbmsm.domain.Mr;
import com.example.hcbmsm.service.MrService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author Xinghm
 * @version 1.0
 * @since 2024/10/31 19:44
 */
@RestController
@CrossOrigin
@RequestMapping("/mr")
public class MrController {
    @Autowired
    private MrService mrService;

    @PostMapping("/add")
    public Map add(String token, @RequestBody Mr mr) {
        return mrService.add(token, mr);
    }

    @GetMapping("/listByPatId")
    public Map getListByPatId(String token) {
        return mrService.getListByPatId(token);
    }
}
